﻿<?php
$bdd = new PDO('mysql:host=localhost;dbname=brin_de_soleil', 'root', '');
$reponse = $bdd->query("SELECT * FROM prospect NATURAL JOIN adresse,coordonnee,etablissement,ville WHERE date_inscription_hiver = '$_POST[hiver_prospect]'");

		echo"<table border= 1>";
		echo"<tr align= center>";
				echo"<td><b>Matricule</b></td>";
				echo"<td><b>Date création</b></td>";
				echo"<td><b>Qualité</b></td>";
				echo"<td><b>Num. poste</b></td>";
				echo"<td><b>Région</b></td>";
				echo"<td><b>Département</b></td>";
				echo"<td><b>Classification</b></td>";
				echo"<td><b>Num. salariés</b></td>";
				echo"<td><b>Nb particip. concernés</b></td>";
				echo"<td><b>Potentiel particip.</b></td>";
				echo"<td><b>Nb borchures</b></td>";
				echo"<td><b>Date hiver</b></td>";
				echo"<td><b>Date inscription hiver</b></td>";
				echo"<td><b>Date  été</b></td>";
				echo"<td><b>Date inscription été</b></td>";
				echo"<td><b>Fonctionnement collect.</b></td>";
				echo"<td><b>Rue</b></td>";
				echo"<td><b>Code postal</b></td>";
				echo"<td><b>Téléphone 1</b></td>";
				echo"<td><b>Téléphone 2</b></td>";
				echo"<td><b>Fax</b></td>";
				echo"<td><b>Email</b></td>";
				echo"<td><b>Nom établissement</b></td>";
				echo"<td><b>Ville</b></td>";
		echo"</tr>";
	while ($donnees = $reponse->fetch())
    {
		echo"<tr>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['matricule']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['date_creation']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['qualite']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['num_poste']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['region']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['departement']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['classification']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['num_salaries']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['nb_particip_concerne']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['potentiel_particip']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['nb_brochure']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['date_hiver']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['date_inscription_hiver']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['date_ete']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['date_inscription_ete']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['fonctionnement_collect']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['rue']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['codepostal']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['telephone1']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['telephone2']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['fax']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['mail']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['nom_etablissement']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['nom']."'/></td>";		
			
			echo"</tr>";
	}
			echo"</table>";
	
?> 